import 'package:flutter/material.dart';

class Productpage extends StatelessWidget {
  final arguments;
  const Productpage({this.arguments, Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Product Demo"),
      ),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          ElevatedButton(
            onPressed: () {
              Navigator.pushNamed(context, '/productInfo',
                  arguments: {"pid": 456});
            },
            child: Text("跳转到商品详情页面"),
          ),
        ],
      ),
    );
  }
}
